package com.neusoft.springbootredis.dao.mapper;

import com.neusoft.springbootredis.domain.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserMapper {

    @Insert("insert into user(user_id,age,password,user_name) values(#{user_id},#{age},#{password},#{user_name})")
    public int insert(User user);
    @Delete("delete from user where user_id = #{user_id}")
    public int delete(@Param("user_id") Integer id);
    @Update("update user set age=#{age},password=#{password},user_name=#{user_name} where user_id=#{user_id}")
    public int update(User user);

    @Select("select * from user where user_id=#{user_id}")
    public User findUserByID(@Param("user_id") Integer id);


   /// public List<User> findAll();
}
